<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html>

<html>
<head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<jsp:include page="/core/tool/resources.jsp"></jsp:include>

</head>

<body>

	<div id="toolbar">
	   <a class="easyui-linkbutton" iconCls="icon-add" onclick="$('#dg').edatagrid('addRow')">新增</a>
	   <a class="easyui-linkbutton" iconCls="icon-reload" onclick="$('#dg').edatagrid('reload')">刷新</a>
       <a class="easyui-linkbutton" iconCls="icon-remove" onclick="$('#dg').edatagrid('destroyRow')">删除</a>
       <a class="easyui-linkbutton" iconCls="icon-save" onclick="$('#dg').edatagrid('saveRow');">保存</a>
       <a class="easyui-linkbutton" iconCls="icon-undo" onclick="$('#dg').edatagrid('cancelRow')">取消</a>
	</div>

	<table id="dg" class="easyui-edatagrid"
		data-options="toolbar:'#toolbar', singleSelect:true, collapsible:true, rownumbers:true, fit:true, editing:true,
				 	sortOrder:'desc', sortName:'specialDay', pagination:true, pageSize:20, 
				 	url:'./page.json', saveUrl:'./update.json', updateUrl:'./update.json', destroyUrl:'./delete.json',
				 	onSave: function(){$('#dg').edatagrid('reload');}
			">
		<thead>
			<tr>
				<th data-options="field:'code',width:80">日历代码</th>
				<th data-options="field:'specialDay', width:120, editor:'datebox', sortable:true">日期</th>
				<th data-options="field:'isHoliday',width:80, editor:{type:'combobox',options:{flexset:'BASE_TRUEFALSE'}}">是否假日</th>
			</tr>
		</thead>
	</table>

</body>
</html>
